package com.example.smart_campus.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serializable;

/**
 * <p>
 * 图书馆表，存储图书馆的书籍信息
 * </p>
 *
 * @author liyv
 * @since 2024-10-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table("libraryBooks")
public class LibraryBooks implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 图书ID，主键
     */
    @TableId(value = "book_id", type = IdType.AUTO)
    private Integer bookId;

    /**
     * 书名
     */
    private String title;

    /**
     * 作者
     */
    private String author;

    /**
     * 出版社
     */
    private String publisher;

    /**
     * 出版日期
     */
    private LocalDate publishDate;

    /**
     * 存放位置
     */
    private String location;



    @Override
    public String toString() {
        return "LibraryBooks{" +
        "bookId=" + bookId +
        ", title=" + title +
        ", author=" + author +
        ", publisher=" + publisher +
        ", publishDate=" + publishDate +
        ", location=" + location +
        "}";
    }
}
